<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: MediaNode</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Class: MediaNode</h1>

    




<section>

<header>
    
        <h2><span class="attribs"><span class="type-signature"></span></span>MediaNode<span class="signature">()</span><span class="type-signature"></span></h2>
        
    
</header>

<article>
    <div class="container-overview">
    
        

    

    
    <h4 class="name" id="MediaNode"><span class="type-signature"></span>new MediaNode<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Initialise an instance of a MediaNode.
This should not be called directly, but extended by other Node Types which use a <code>HTMLMediaElement</code>.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="SourceNodes_medianode.js.html">SourceNodes/medianode.js</a>, <a href="SourceNodes_medianode.js.html#line9">line 9</a>
    </li></ul></dd>
    

    

    

    
</dl>




















    
    </div>

    

    

    

    

    

    

    
        <h3 class="subsection-title">Members</h3>

        
            
<h4 class="name" id="_buffering"><span class="type-signature"></span>_buffering<span class="type-signature"></span></h4>


<p class="summary"><ul>
<li>Check if the element is waiting on the network to continue playback</li>
</ul></p>









    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="SourceNodes_medianode.js.html">SourceNodes/medianode.js</a>, <a href="SourceNodes_medianode.js.html#line70">line 70</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="_buffering"><span class="type-signature"></span>_buffering<span class="type-signature"></span></h4>


<p class="summary"><ul>
<li>Check if the element is waiting on the network to continue playback</li>
</ul></p>









    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="SourceNodes_medianode.js.html">SourceNodes/medianode.js</a>, <a href="SourceNodes_medianode.js.html#line70">line 70</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="_element"><span class="type-signature"></span>_element<span class="type-signature"></span></h4>




<div class="description">
    <p>Get a cached video element and also pass this instance so the
cache can access the current play state.</p>
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="SourceNodes_medianode.js.html">SourceNodes/medianode.js</a>, <a href="SourceNodes_medianode.js.html#line91">line 91</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="_element"><span class="type-signature"></span>_element<span class="type-signature"></span></h4>




<div class="description">
    <p>Get a cached video element and also pass this instance so the
cache can access the current play state.</p>
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="SourceNodes_medianode.js.html">SourceNodes/medianode.js</a>, <a href="SourceNodes_medianode.js.html#line91">line 91</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    
    <h4 class="name" id="_load"><span class="type-signature"></span>_load<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>_load has two functions:</p>
<ol>
<li>
<p><code>_triggerLoad</code> which ensures the element has the correct src and is at the correct currentTime,
so that the browser can start fetching media.</p>
</li>
<li>
<p><code>shouldPollForElementReadyState</code> waits until the element has a &quot;readState&quot; that signals there
is enough media to start playback. This is a little confusing as currently structured.
We're using the _update loop to poll the _load function which checks the element status.
When ready we fire off the &quot;loaded callback&quot;</p>
</li>
</ol>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="SourceNodes_medianode.js.html">SourceNodes/medianode.js</a>, <a href="SourceNodes_medianode.js.html#line147">line 147</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="_load"><span class="type-signature"></span>_load<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>_load has two functions:</p>
<ol>
<li>
<p><code>_triggerLoad</code> which ensures the element has the correct src and is at the correct currentTime,
so that the browser can start fetching media.</p>
</li>
<li>
<p><code>shouldPollForElementReadyState</code> waits until the element has a &quot;readState&quot; that signals there
is enough media to start playback. This is a little confusing as currently structured.
We're using the _update loop to poll the _load function which checks the element status.
When ready we fire off the &quot;loaded callback&quot;</p>
</li>
</ol>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="SourceNodes_medianode.js.html">SourceNodes/medianode.js</a>, <a href="SourceNodes_medianode.js.html#line147">line 147</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
    

    

    
</article>

</section>







<section>

<header>
    
        <h2><span class="attribs"><span class="type-signature"></span></span>MediaNode<span class="signature">()</span><span class="type-signature"></span></h2>
        
    
</header>

<article>
    <div class="container-overview">
    
        

    

    
    <h4 class="name" id="MediaNode"><span class="type-signature"></span>new MediaNode<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Initialise an instance of a MediaNode.
This should not be called directly, but extended by other Node Types which use a <code>HTMLMediaElement</code>.</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="SourceNodes_medianode.js.html">SourceNodes/medianode.js</a>, <a href="SourceNodes_medianode.js.html#line9">line 9</a>
    </li></ul></dd>
    

    

    

    
</dl>




















    
    </div>

    

    

    

    

    

    

    
        <h3 class="subsection-title">Members</h3>

        
            
<h4 class="name" id="_buffering"><span class="type-signature"></span>_buffering<span class="type-signature"></span></h4>


<p class="summary"><ul>
<li>Check if the element is waiting on the network to continue playback</li>
</ul></p>









    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="SourceNodes_medianode.js.html">SourceNodes/medianode.js</a>, <a href="SourceNodes_medianode.js.html#line70">line 70</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="_buffering"><span class="type-signature"></span>_buffering<span class="type-signature"></span></h4>


<p class="summary"><ul>
<li>Check if the element is waiting on the network to continue playback</li>
</ul></p>









    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="SourceNodes_medianode.js.html">SourceNodes/medianode.js</a>, <a href="SourceNodes_medianode.js.html#line70">line 70</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="_element"><span class="type-signature"></span>_element<span class="type-signature"></span></h4>




<div class="description">
    <p>Get a cached video element and also pass this instance so the
cache can access the current play state.</p>
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="SourceNodes_medianode.js.html">SourceNodes/medianode.js</a>, <a href="SourceNodes_medianode.js.html#line91">line 91</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="_element"><span class="type-signature"></span>_element<span class="type-signature"></span></h4>




<div class="description">
    <p>Get a cached video element and also pass this instance so the
cache can access the current play state.</p>
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="SourceNodes_medianode.js.html">SourceNodes/medianode.js</a>, <a href="SourceNodes_medianode.js.html#line91">line 91</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    
    <h4 class="name" id="_load"><span class="type-signature"></span>_load<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>_load has two functions:</p>
<ol>
<li>
<p><code>_triggerLoad</code> which ensures the element has the correct src and is at the correct currentTime,
so that the browser can start fetching media.</p>
</li>
<li>
<p><code>shouldPollForElementReadyState</code> waits until the element has a &quot;readState&quot; that signals there
is enough media to start playback. This is a little confusing as currently structured.
We're using the _update loop to poll the _load function which checks the element status.
When ready we fire off the &quot;loaded callback&quot;</p>
</li>
</ol>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="SourceNodes_medianode.js.html">SourceNodes/medianode.js</a>, <a href="SourceNodes_medianode.js.html#line147">line 147</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="_load"><span class="type-signature"></span>_load<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>_load has two functions:</p>
<ol>
<li>
<p><code>_triggerLoad</code> which ensures the element has the correct src and is at the correct currentTime,
so that the browser can start fetching media.</p>
</li>
<li>
<p><code>shouldPollForElementReadyState</code> waits until the element has a &quot;readState&quot; that signals there
is enough media to start playback. This is a little confusing as currently structured.
We're using the _update loop to poll the _load function which checks the element status.
When ready we fire off the &quot;loaded callback&quot;</p>
</li>
</ol>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="SourceNodes_medianode.js.html">SourceNodes/medianode.js</a>, <a href="SourceNodes_medianode.js.html#line147">line 147</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
    

    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-VideoContext.html">VideoContext</a></li></ul><h3>Classes</h3><ul><li><a href="AudioNode.html">AudioNode</a></li><li><a href="CanvasNode.html">CanvasNode</a></li><li><a href="CompositingNode.html">CompositingNode</a></li><li><a href="DestinationNode.html">DestinationNode</a></li><li><a href="EffectNode.html">EffectNode</a></li><li><a href="GraphNode.html">GraphNode</a></li><li><a href="ImageNode.html">ImageNode</a></li><li><a href="MediaNode.html">MediaNode</a></li><li><a href="module-VideoContext.html">VideoContext</a></li><li><a href="ProcessingNode.html">ProcessingNode</a></li><li><a href="RenderGraph.html">RenderGraph</a></li><li><a href="SourceNode.html">SourceNode</a></li><li><a href="TransitionNode.html">TransitionNode</a></li><li><a href="VideoElementCacheItem.html">VideoElementCacheItem</a></li><li><a href="VideoNode.html">VideoNode</a></li></ul>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a>
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>